import { registerAs } from '@nestjs/config';
import { JwtModuleOptions } from '@nestjs/jwt';

export const jwtModuleOptions: JwtModuleOptions = {
  secret: process.env.jwt_secret,
  signOptions: {
    expiresIn: process.env.jwt_sign_options,
  },
};

export const JWTConfig = registerAs('jwt', () => jwtModuleOptions);
